<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?php echo $this->PageTitle;?></title>
<link rel="icon" type="image/ico" href="<?php echo Yii::app()->theme->baseUrl;?>/favicon.ico"/>
<link href="<?php echo Yii::app()->theme->baseUrl;?>/css/stylesheets.css" rel="stylesheet" type="text/css" />
<link rel='stylesheet' type='text/css' href='<?php echo Yii::app()->theme->baseUrl;?>/css/fullcalendar.print.css' media='print' />
<!--<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/jquery.min.js'></script>-->
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/jquery-ui.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/jquery/jquery.mousewheel.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/cookie/jquery.cookies.2.2.0.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/bootstrap.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/charts/excanvas.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/charts/jquery.flot.js'></script>    
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/charts/jquery.flot.stack.js'></script>    
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/charts/jquery.flot.pie.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/charts/jquery.flot.resize.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/sparklines/jquery.sparkline.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/fullcalendar/fullcalendar.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/select2/select2.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/uniform/uniform.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/maskedinput/jquery.maskedinput-1.3.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/validation/languages/jquery.validationEngine-en.js' charset='utf-8'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/validation/jquery.validationEngine.js' charset='utf-8'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/animatedprogressbar/animated_progressbar.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/qtip/jquery.qtip-1.0.0-rc3.min.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/cleditor/jquery.cleditor.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/dataTables/jquery.dataTables.min.js'></script>    
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins/fancybox/jquery.fancybox.pack.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/cookies.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/actions.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->theme->baseUrl;?>/js/plugins.js'></script>
<script type='text/javascript' src='<?php echo Yii::app()->baseUrl;?>/ckeditor/ckeditor.js'></script>
<script>
	var www_path = '<?php echo YiiBase::getPathOfAlias("webroot");?>';
	var webroot = '<?php echo Yii::app()->baseUrl;?>';
</script>
</head>
<body>
    <div class="header">
        <a class="logo" href="<?php echo PIUrl::createUrl('/admincp');?>"><img src="<?php echo Yii::app()->theme->baseUrl;?>/img/logo.png" alt="Aquarius -  responsive admin panel" title="Aquarius -  responsive admin panel"/></a>
        <ul class="header_menu">
            <li class="list_icon"><a href="#">&nbsp;</a></li>
        </ul>    
    </div>
    
    <div class="menu">
        <ul class="navigation">
            <li class="active">
                <a href="<?php echo PIUrl::createUrl('/user/logout');?>">
                    <span class="isw-grid"></span><span class="text"><?php echo translate('Đăng xuất');?></span>
                </a>
            </li>
            <li class="openable active">
                <a href="#">
                    <span class="isw-list"></span><span class="text"><?php echo translate('Thông tin');?></span>
                </a>
                <ul>
					<li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/default');?>">
                            <span class="icon-th"></span><span class="text"><?php echo translate('Quản lý đơn hàng');?></span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/information/1');?>">
                            <span class="icon-th"></span><span class="text"><?php echo translate('Giới thiệu');?></span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/information/2');?>">
                            <span class="icon-th"></span><span class="text"><?php echo translate('Quy định chung');?></span>
                        </a>
                    </li>
                </ul>
            </li>          
			
           <li class="openable active <?php if(Yii::app()->controller->id == 'acticleCategory' || Yii::app()->controller->id == 'acticle') echo 'active';?>">
                <a href="#">
                    <span class="isw-text_document"></span><span class="text">Bài viết</span>                    
                </a>
                <ul>
					<?php if(isset($_GET['admin'])):?>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/acticleCategory');?>">
                            <span class=" icon-align-justify"></span><span class="text">Danh mục bài viết</span>
                        </a>
                    </li>
					<?php endif;?>
					<?php $categories = Yii::app()->getModule('admincp')->getCategories();?>
					<?php if(!empty($categories)) foreach($categories as $category):?>
					<li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/acticle',array('category'=>$category->id));?>">
                            <span class="icon-pencil"></span><span class="text"><?php echo translate('Quản lý ');?> <?php echo $category->name;?></span>
                        </a>
                    </li>
					<?php endforeach;?>
                </ul>
            </li> 
          
            <li class="openable active">
                <a href="#">
                    <span class="isw-settings"></span><span class="text">Cài đặt hệ thống</span>                    
                </a>
                <ul>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/systemInfo');?>">
                            <span class="icon-pencil"></span><span class="text">Thông tin hệ thống</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/admincp/systemInfo/slideHome');?>">
                            <span class="icon-picture"></span><span class="text">Slide trang chủ</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo PIUrl::createUrl('/user/admin/update/id/1');?>">
                            <span class="icon-user"></span><span class="text">Thông tin đăng nhập</span>
                        </a>
                    </li>                    
                </ul>
            </li>                                              
        </ul>
        
    </div>
        
    <div class="content">
        <div class="breadLine">
        </div>
        <div class="workplace">
		<?php if(Yii::app()->user->hasFlash('success')):?>
			<div class="alert alert-success">
                <h4>Thành công!</h4>
                 <?php echo Yii::app()->user->getFlash('success'); ?>
            </div>
		<?php endif;?>
		
		<?php if(Yii::app()->user->hasFlash('error')):?>
			<div class="alert alert-error">
                <h4>Lỗi!</h4>
                 <?php echo Yii::app()->user->getFlash('error'); ?>
            </div>
		<?php endif;?>
        	<?php echo $content;?>
        </div>
    </div>
</body>
</html>